<!DOCTYPE HTML>
<html lang="en" ng-app="launcherApp">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>macchina.io - Launcher</title>
    <link rel="stylesheet" href="/css/macchina.css" type="text/css"/>
    <link rel="stylesheet" href="/css/font-awesome.min.css" type="text/css"/>
    <link rel="stylesheet" href="/macchina/launcher/css/styles.css" type="text/css"/>
    <link rel="icon" href="/images/favicon.ico">
    <script type="text/javascript" src="/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="/angular/angular.min.js"></script>
    <script type="text/javascript" src="/macchina/launcher/js/app.js"></script>
    <script type="text/javascript" src="/macchina/launcher/js/controllers.js"></script>
  </head>
  <body ng-controller="SessionCtrl">
    <header>
      <div class="headercontainer">
        <div class="header">
          <h1>
          <a href="/"><img src="/images/headerlogo.png" srcset="/images/headerlogo-x2.png 2x" alt="macchina.io"></a>
          </h1>
        </div>
      </div>
    </header>
    <div class="contentcontainer">
      <div class="content">
        <nav>
          <div class="usernav">
            <div class="navigation">
            </div>
            <div class="username">
              <i class="fa fa-user"></i>
              &nbsp;
              {{session.username}}
              &nbsp;
              <a id="logoutLink" href="#" onclick="document.logout.submit()">Sign out</a>
           </div>
           <form method="post" name="logout" action="/">
             <input type="hidden" name="action" value="logout">
           </form>
           <div style="clear: both;"></div>
         </div>
        </nav>
        <div class="appgrid" ng-controller="AppGridCtrl">
            <div class="appitem" ng-repeat="app in apps">
              <div class="appicon"><a href="{{app.link}}"><img ng-src="{{app.icon}}" title="{{app.title}}"></a></div>
              <div class="apptitle"><a href="{{app.link}}" title="{{app.title}}">{{app.title}}</a></div>
            </div>
          </a>
          <div id="noAppsFound" ng-if="appsLoading()">
          Loading...
          </div>
          <div id="noAppsFound" ng-if="!appsAvailable() && !appsLoading()">
          No applications found.
          </div>
        </div>
      </div>
    </div>
  </body>
</html>
